1. Field of the Invention
The present invention generally relates to computer systems and computer graphics. More particularly, the present invention relates to a more efficient display of a gradient, such as a gradient of color or intensity, in a display comprised of a plurality of pixels.
2. Description of the Related Art
Computer graphics systems display graphical representations of objects on a two-dimensional display screen that includes a plurality of pixels. A pixel is discrete point of illumination on the display, and the collective illumination from the plurality of pixels ultimately constitutes an image on the display. Typically, the color and intensity of each pixel on the display is controlled per every refresh cycle of the display.
In the graphics rendering process, an object to be represented on the display screen is broken down into a plurality of graphics primitives. Primitives are basic components of a graphics picture and may include points, lines, vectors and polygons, such as triangles. Typically, a hardware and software graphics system is implemented to render, or draw, the graphics primitives that represent the view of one or more objects on the screen. The primitives that define the object to be rendered are provided from a host computer, which defines each primitive in terms of primitive data. For example, when the primitive is a triangle, the host computer can define the primitive in terms of the X, Y, Z coordinates of its vertices, as well as the Red, Green, and Blue (R, G, B) color values of each vertex. Rendering hardware then interpolates the primitive data to compute the specific display screen pixels that are illuminated to represent each primitive, and the R, G, B values for each pixel to enable the full color range for the pixel.
The standard method of performing the fill operation of the graphics data to the pixels is to write data to each pixel of the display. As many computer display screens have a significant number of pixels with a large amount of data for each pixel, a fill process that includes data operations on each pixel is time consuming and has significant overhead in rendering. To save time in rendering, it is known to utilize a “fast-clear” algorithm in which the data in pixels is selectively ignored during pixel data operations, especially if the pixel data is unchanged during rendering of the frames.
Extant fast-clear algorithms typically have a clear bit that indicates if the pixel data is to be ignored in specific pixel data operations. The previous implementations of the fast-clear algorithm require that the same “clear” value be used for all the pixels on the display which have their clear bit set. That is, all pixels that are ignored in a specific pixel data operation must have the same default data value, such as color, intensity, etc. However, some computer graphics applications fill large areas of the display with a gradient, such as a gradient of color or intensity, which changes linearly from one section of the display to another, such as the top of the display screen to the bottom. Existing fast-clear algorithms are not advantageous for use with the gradient display because all of the pixels do not have a common default (“clear”) value, and thus, each pixel that is part of the gradient will still require refreshing at each rendering cycle.
It would accordingly be advantageous to provide a system in which a fast fill operation can be used in graphics rendering where an otherwise static gradient can be maintained on a display without needing to fill each pixel of the display per rendering cycle. Such system and method should account for the gradient values in the pixel data, such as color or intensity, while being ignored during the pixel data operations. It is therefore to the provision of such a system and method for providing fast pixel clears in a display having a gradient thereupon that the present invention is primarily directed.